package com.imooc.exception;

import com.imooc.enums.ResultEnum;
import lombok.Getter;

/**
 * 功能描述: <br>
 * (系统运行时异常)
 *
 * @Author:Mr. xyb
 * @Date: 2018/5/18 17:02
 * @since: 1.8.0
 * @version: 1.0.0
 */
@Getter
public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
